<?php

use think\migration\Migrator;

class FixPhotoDataSize extends Migrator
{
    /**
     * 执行迁移
     */
    public function change()
    {
        // 修改 system_checkin_log 表的 photo_data 字段为 LONGTEXT
        $table = $this->table('system_checkin_log');
        $table->changeColumn('photo_data', 'text', [
            'limit' => \Phinx\Db\Adapter\MysqlAdapter::TEXT_LONG,
            'null' => true, 
            'comment' => '人脸照片数据(base64)'
        ])
        ->update();
    }
}
